* {
  margin: 0;
  padding: 0;
}
.nav {
  width: 100%;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav a {
  color: #fff;
  text-decoration: none;
  width: 100px;
  text-align: center;
}
.nav .logo {
  background-image: url(../img/logo.svg);
  background-repeat: no-repeat;
  height: 44px;
  background-position: center;
}
.nav .search {
  background-image: url(../img/search.svg);
  background-repeat: no-repeat;
  height: 44px;
  background-position: center;
}
.nav .buy {
  background-image: url(../img/buy.svg);
  background-repeat: no-repeat;
  height: 44px;
  background-position: center;
}
.toggleBtn {
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}
.toggleBtn .line {
  width: 18px;
  height: 1px;
  background-color: #fff;
  display: none;
  /* transform-origin: 20%; */
  transition: all 0.5s;
}
.toggleBtn .line:nth-child(1) {
  position: absolute;
  top: 17px;
  left: calc(50% - 9px);
  transform-origin: 20%;
}
.toggleBtn .line:nth-child(2) {
  position: absolute;
  top: 25px;
  left: calc(50% - 9px);
  transform-origin: 20%;
}
.navpage {
  display: flex;
  transition: all 0.5s;
  position: fixed;
  left: 0;
  top: 0;
  height: 0;
  width: 100vh;
  overflow: hidden;
  background-color: #000;
  opacity: 0;
}
.navpage .navMain {
  width: 100%;
}
@media only screen and (max-width: 768px) {
  .toggleBtn .line {
    display: block;
  }
  .nav .text,
  .nav .search {
    display: none;
  }
  .nav .logo {
    order: 2;
    position: relative;
    z-index: 100;
  }
  .nav .toggleBtn {
    order: 1;
    display: flex;
    position: relative;
    z-index: 100;
  }
  .nav .buy {
    order: 3;
  }
  .nav {
    justify-content: space-between;
  }
  .nav a,
  .nav label {
    width: 50px;
  }
  #choose:checked ~ .toggleBtn .line:nth-child(1) {
    transform: rotate(45deg);
  }
  #choose:checked ~ .toggleBtn .line:nth-child(2) {
    transform: rotate(-45deg);
  }
  #choose:checked ~ .navpage {
    display: flex;
    background-color: #000;
    width: 100vw;
    height: 100vh;
    padding-top: 44px;
    flex-direction: column;
    color: #fff;
    opacity: 1;
  }
  .searchInput {
    height: 36px;
    display: flex;
    background-color: rgba(45, 45, 45, 0.98);
    justify-content: flex-start;
    margin: 0 10px;
    border-radius: 5px;
    align-items: center;
  }
  .searchInput .icon {
    width: 32px;
    height: 36px;
    background-image: url(../img/search.svg);
    background-repeat: no-repeat;
    background-position: center;
  }
  .searchInput input {
    flex: 1;
    margin: 0 5px;
    height: 100%;
    border: none;
    color: #fff;
    background-color: rgba(45, 45, 45, 0.98);
    outline: none;
  }
  .navMain hr {
    margin: 15px 0;
    border-color: #444;
  }
  .navList {
    margin: 0 40px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .navList a {
    width: 100%;
    height: 44px;
    line-height: 44px;
    border-bottom: 1px solid #444;
    text-align: left;
  }
  .navList a:last-child {
    border-bottom: none;
  }
}
